package cn.eud360.javafuxi.suanfa;

import java.util.Arrays;

public class MaoPao {
    public static void main(String[] args) {
        //定义一个数组
        int[] arr= new int[]{45, 34, 200, 65, 0};
        for(int i=0;i<arr.length-2;i++){
            for(int j=i+1;j<=arr.length-1;j++){
                if(arr[i]>arr[j]){
                    int temp;
                    temp=arr[i];
                    arr[i]=arr[j];
                    arr[j]=temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
